package streamApi;

import java.util.Objects;

public class PatientTemperatureVo {
    public String name;
    public String dateStr;
    public double temperature;

    public PatientTemperatureVo(String name, String dateStr, double temperature) {
        this.name = name;
        this.dateStr = dateStr;
        this.temperature = temperature;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDateStr() {
        return dateStr;
    }

    public void setDateStr(String dateStr) {
        this.dateStr = dateStr;
    }

    public double getTemperature() {
        return temperature;
    }

    public void setTemperature(double temperature) {
        this.temperature = temperature;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PatientTemperatureVo that = (PatientTemperatureVo) o;
        return Double.compare(that.temperature, temperature) == 0 &&
                name.equals(that.name) &&
                dateStr.equals(that.dateStr);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, dateStr, temperature);
    }

    @Override
    public String toString() {
        return "PatientTemperatureVo{" +
                "name='" + name + '\'' +
                ", dateStr='" + dateStr + '\'' +
                ", temperature=" + temperature +
                '}';
    }
}
